package com.tanhua.server.service;

import com.tanhua.dubbo.api.mongo.UserLocationApi;
import com.tanhua.server.interceptor.UserHolder;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;

@Service
public class BaiduService {

    @DubboReference
    private UserLocationApi userLocationApi;


    /**
     * 上报定位信息
     * @param latitude
     * @param longitude
     * @param addrStr
     */
    public void reportLocation(Double latitude, Double longitude, String addrStr) {
        userLocationApi.save(UserHolder.getUserId(), latitude, longitude, addrStr);
    }
}
